package com.shareyi.simpleserver.servlet.config;

import java.util.ArrayList;
import java.util.List;

import com.shareyi.simpleserver.core.HttpConstant;

public class FilterMappingBean {
	
	private String filterName;
	private String urlPattern;
	private int patternType;
	private List<String> dispatcherList;
	
 	public String getFilterName() {
		return filterName;
	}
	public void setFilterName(String filterName) {
		this.filterName = filterName;
	}
	public String getUrlPattern() {
		return urlPattern;
	}
	public void setUrlPattern(String urlPattern) {
		this.urlPattern = urlPattern;
	}
	public int getPatternType() {
		return patternType;
	}
	public void setPatternType(int patternType) {
		this.patternType = patternType;
	}

	public void setDispatcher(String dispathcer){
		if(dispatcherList==null){
			dispatcherList=new ArrayList(4);
		}
		dispatcherList.add(dispathcer);
	}
	public List<String> getDispatcherList() {
		if(dispatcherList==null){
			dispatcherList=new ArrayList(4);
			//默认包含request选项
			dispatcherList.add(HttpConstant.DISPATCH_TYPE_REQUEST);
		}
		return dispatcherList;
	}
	
	
	
	
}
